<?php
require_once(dirname(__FILE__).'/include/common.inc.php');
require_once(DEDEINC.'/memberlogin.class.php');

$keeptime = isset($keeptime) && is_numeric($keeptime) ? $keeptime : -1;
$cfg_ml = new MemberLogin($keeptime);

echo 'document.write(\'';
echo '<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">';

//判断用户是否登录
$myurl = '';
if($cfg_ml->IsLogin())
{
	$myurl = $cfg_memberurl."/index.php?uid=".urlencode($cfg_ml->M_LoginID);
	if(!ereg('^http:',$myurl))
	{
		$myurl = $cfg_basehost.$myurl;
	}
	
	echo '<tr>';
	echo '<td width="50%" align="center"><img src="'.$cfg_templeturl.'/images/uesr_1.gif" width="27" height="26" align="absmiddle" />';
	echo '<a href='.$myurl.' target="_parent" class="xia14"><font color="#E50000">'.$cfg_ml->M_UserName.'</font></a></td>';
	echo '<td align="center"><img src="'.$cfg_templeturl.'/images/uesr_2.gif" width="27" height="26" align="absmiddle" />';
	
	echo '<a href="'.$cfg_mainsite.'" target="_blank" class="xia14"><font color="#FC3A7E">找服务商家</font></a></td>';
	
	echo '</tr>';
	echo '<tr>';
	echo '<td height="24" colspan="2" align="center" valign="middle"><a href="'.$cfg_memberurl.'/index_do.php?fmdo=login&dopost=exit" target="_parent"><img src="'.DEDETEMPLATE.'/images/tuichu.gif" border="0" align="absmiddle"></a></td>';
	echo '</tr>';
}
else
{
	echo '<tr>';
	echo '<td width="50%" align="center"><img src="'.$cfg_templeturl.'/images/uesr_1.gif" width="27" height="26" align="absmiddle" />';
	echo '<a href="'.$cfg_memberurl.'/reg_new.php" target="_blank" class="xia14"><font color="#FC3A7E">免费注册</font></a></td>';
	echo '<td align="center"><img src="'.$cfg_templeturl.'/images/uesr_2.gif" width="27" height="26" align="absmiddle" />';
	
	echo '<a href="'.$cfg_mainsite.'" target="_blank" class="xia14"><font color="#FC3A7E">找服务商家</font></a></td>';
	
	echo '</tr>';
	echo '<tr>';
	echo '<td height="24" colspan="2" align="center" valign="middle"><FONT color=#666666>交流 问题解答</FONT>';
	echo '<A class=px12line href="'.$cfg_memberurl.'/reg_new.php" target=_blank><FONT color=#fc3a7e> 注册为会员,享受精彩服务</FONT></A></td>';
	echo '</tr>';
}
echo '<tr>';
echo '<td height="23" colspan="2" align="center" valign="middle"><font color="#666666">';
echo '论坛状态API</font></td>';
echo '</tr>';
echo '</table>';
echo '\');';
?>